package com.sinaapp.mrblog.game.Assasin.model;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.sinaapp.mrblog.game.Assasin.util.AssasinManager;

public class BulletDust extends BaseActor{
	public static final int BULLETUST_STATE_DYING = 1;
	public static final int BULLETUST_STATE_DIED = 2;
	
	public static final float BULLETDUST_WIDTH = 1f;
	public static final float BULLETDUST_HEIGHT = 1f;
	
	public static final float DIS_TIME = 0.5f;
	
	public BulletDust(float x,float y , float angle) {
		super(x, y, BULLETDUST_WIDTH, BULLETDUST_HEIGHT);
		setState(BULLETUST_STATE_DYING);
		alpha = 0.5f;
		this.angle = angle;
	}
	
	@Override
	public void act(float delta) {
		region = AssasinManager.bulletDustRegion;
		if(getState() == BULLETUST_STATE_DYING){
			alpha -= 1/DIS_TIME*delta;
		}
		
		if(alpha<0){
			setState(BULLETUST_STATE_DIED);
		}
		
		super.act(delta);
	}

	@Override
	public void refreshStatus() {
		setState(BULLETUST_STATE_DIED);
	}

	@Override
	public TextureRegion getReadyRegion() {
		return null;
	}
	
}
